package com.hotel.customersystem.pojo;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * (CustomerOrder)表实体类
 *
 * @author makejava
 * @since 2022-09-30 16:21:27
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "customer_order")
public class CustomerOrder implements Serializable {
    private static final long serialVersionUID = 6411096936154360279L;
    //订单id
    @TableId
    private Integer orderId;
    //酒店id
    private Integer hotelId;
    //订单编号
    private String orderNo;
    //入住日期
    private LocalDateTime cheakInDate;
    //退房日期
    private LocalDateTime cheakOutDate;
    //订单日期
    @JsonFormat(pattern= "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime orderTime;
    //支付价格
    private String orderPrice;
    //订单状态
    private Integer orderStatus;
    //订单数据有效状态
    private Integer orderDataStatus;
    //用户id
    private Integer userId;
    //行锁
    private Integer version;
    //状态
    private Integer state;
    //创建时间
//    @JsonFormat(pattern= "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    //更新时间
    @JsonFormat(pattern= "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;
    //折扣券编号
    private String standby01;
    //满减券编号
    private String standby02;
    //酒店名
    private String hotelName;
    //房型
    private String roomType;
    @Transient
    @TableField(exist = false)
    private LocalDate checkInTime;

    @Transient
    @TableField(exist = false)
    private LocalDate checkOutTime;

    @Transient
    @TableField(exist = false)
    private String endTime;
}

